
#pragma once

#include <PlayFab<%- gemName %>Sdk/PlayFabError.h>
#include <PlayFab<%- gemName %>Sdk/PlayFab<%- api.name %>DataModels.h>
#include <AzCore/EBus/EBus.h>

namespace PlayFab<%- gemName %>Sdk
{
    class PlayFab<%- gemName %>_<%- api.name %>Requests
        : public AZ::EBusTraits
    {

    public:
        static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
        static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;

        virtual int GetPendingCalls() = 0;
<% if (hasClientOptions) { %>
        virtual bool IsClientLoggedIn() = 0;
<% } %>
        // ------------ Generated API call wrappers
<% for(var i in api.calls) { var apiCall = api.calls[i]; if(HasRequest(apiCall, api)) {
%>        virtual void <%- apiCall.name %>(<%- api.name %>Models::<%- apiCall.request %>& request, ProcessApiCallback<<%- api.name %>Models::<%- apiCall.result%>> callback = nullptr, ErrorCallback errorCallback = nullptr, void* customData = nullptr) = 0;
<% } else
{%>        virtual void <%- apiCall.name %>(ProcessApiCallback<<%- api.name %>Models::<%- apiCall.result%>> callback = nullptr, ErrorCallback errorCallback = nullptr, void* customData = nullptr) = 0;
<% } }
%>    };

    using PlayFab<%- gemName %>_<%- api.name %>RequestBus = AZ::EBus<PlayFab<%- gemName %>_<%- api.name %>Requests>;
} // namespace PlayFab<%- gemName %>Sdk
